type go/types.Const
23 uses
go/types (current package)
assignments.go#L105: func (check *Checker) initConst(lhs *Const, x *operand) {
call.go#L495: case *Const:
decl.go#L131: case *Const:
decl.go#L188: case *Const:
decl.go#L230: case *Const, *Var:
decl.go#L417: func (check *Checker) constDecl(obj *Const, typ, init ast.Expr, inherited bool) {
decl.go#L821: lhs := make([]*Const, len(d.spec.Names))
object.go#L201: type Const struct {
object.go#L208: func NewConst(pos token.Pos, pkg *Package, name string, typ Type, val constant.Value) *Const {
object.go#L209: return &Const{object{nil, pos, pkg, name, typ, 0, colorFor(typ), token.NoPos}, val}
object.go#L213: func (obj *Const) Val() constant.Value { return obj.val }
object.go#L215: func (*Const) isDependency() {} // a constant may be a dependency of an initialization expression
object.go#L410: case *Const:
object.go#L522: func (obj *Const) String() string { return ObjectString(obj, nil) }
typexpr.go#L81: case *Const:
typexpr.go#L508: if _, ok := obj.(*Const); !ok {
golang.org/x/exp/apidiff
apidiff.go#L122: case *types.Const:
apidiff.go#L123: if new, ok := new.(*types.Const); ok {
apidiff.go#L157: func (d *differ) constChanges(old, new *types.Const) {
apidiff.go#L174: case *types.Const:
golang.org/x/tools/internal/gcimporter
bexport.go#L204: case *types.Const:
bimport.go#L228: case *types.Const:
iexport.go#L478: case *types.Const: